{include file="index/header" /}

<div class="page-header">
    <h1>
<img    src="__STATIC__/images/single_member.png" data-holder-rendered="true" style="width: 38px; height: 38px;">
         
    在线安装 ThinkPHP5简易商城 【初始化】 </h1>
</div>
<div class="panel panel-default">
    <div class="panel-body"> 
       <h3> 免费开源   thinkphp5mall      </h3>  

    </div>
</div>

{if condition="$Request.param.step<=1"}
<div class="panel panel-default">
    <div class="panel-heading">第一步 环境监测：</div>
    <div class="panel-body">

         
            当前版本:{:phpversion()} 

            

            <!-- {:version_compare(PHP_VERSION,'5.9.0', '<')}  第一步 -->


            {if condition="version_compare(PHP_VERSION,'5.4.0', '>=')"}
                 
                <span class="glyphicon glyphicon-ok" style="color: green" aria-hidden="true"></span>

               
                <a class="btn btn-success" href="#" role="button">合格</a> 

                {if condition="$install_lock==1"}
                  <div class="alert alert-danger alert-dismissible" role="alert">
                  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                  <strong>Warning!</strong> 已安装过，如需再次安装，请删除application目录下的install.lock文件
                </div>
                {else /}
                <a class="btn btn-success" href="{:url('/')}index/index/install/step/2" role="button">下一步</a>
                {/if}
                 
            {else /}
                不合格 <span class="glyphicon glyphicon-remove" style="color: red" aria-hidden="true"></span>  
                <a class="btn btn-danger" href="#" role="button">php版本太低</a>

                <!-- <div class="alert alert-warning" role="alert">请升级PHP版本  >= 5.4.0</div> -->

                <div class="alert alert-danger alert-dismissible" role="alert">
                  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                  <strong>Warning!</strong> 请升级PHP版本  >= 5.4.0
                </div>
            {/if}

        
 


    </div>
</div>
{/if}

 {if condition="$Request.param.step==2"}
<div class="panel panel-default">
    <div class="panel-heading">第二步 填写数据库信息：</div>
    <div class="panel-body">

         
             <form  action="" method="post" name="myformlogin">


                         <div class="form-group " >
                              <label  >连接MySQL数据库地址:</label>
                             <input type="text" class="form-control"    name="hostname" value="{$Request.param.hostname|default='localhost'}"  placeholder="请输入数据库地址" maxlength="100" autocomplete="on" value="localhost">
                          </div>


                          <div class="form-group " >
                              <label  >数据库用户名:</label>
                             <input type="text" class="form-control"   name="username" value="{$Request.param.username|default='root'}" placeholder="请输入数据库用户名" maxlength="100" autocomplete="on"  >
                          </div>
                          

                         <div class="form-group">
                              
                             <label for="exampleInputPassword1">数据库密码：</label>
                             <input type="text" class="form-control" name="password"   placeholder="请输入数据库密码" autocomplete="on" value="{$Request.param.password|default='cVDEPmrRdVZswVWB'}" >
                         </div>


                         <div class="form-group " >
                              <label  >数据库名:</label>
                             <input type="text" class="form-control"    name="database" value="{$Request.param.database|default='demo'}"  placeholder="请输入数据库名" maxlength="100" autocomplete="on" value="root">
                          </div>


 
 


                      
                         <button type="submit" id="btngoto" class="btn btn-primary"  >提交，导入sql数据表</button>
 

         
                         <input type="hidden" class="form-control" id="yan12" name="rand" value="0011" placeholder="请输入获得的验证码" maxlength="100"  style="    margin-bottom:  15px;" readonly>

                     </form>

        
 


    </div>
</div>
{/if}
 
 {if condition="$Request.param.step>=10"}
<div class="panel panel-default">
    <div class="panel-heading">安装成功：</div>
    <div class="panel-body">
         
        <h3>   管理员 账号： 18210787405 密码： 123456 </h3>
      
        <h3>  前台登录 <a class="btn btn-success" href="{:url('/index/index/login')}" role="button"  target="_blank">前台登录</a>   丨  后台登录地址  <a class="btn btn-success" href="{:url('/admin/index/login')}" role="button" target="_blank">后台登录</a> </h3>

        <h5><small> 如需 <a   href="{:url('/')}index/index/install/step/1" role="button">重新安装</a>，请删除根application文件夹下的 install.lock 文件。</small></h5>

    </div>
</div>
{/if}

<div class="panel panel-default">
    <div class="panel-heading">安装说明：</div>
    <div class="panel-body">
         
        <h5><small>  通过try功能捕获了tp5调试模式的错误提示</small></h5>
      
        <h5><small>  基本实现，还有许多不足</small></h5>

    </div>
</div>


 

 